// 角色接口

import axios from '../utils/request'

// 获取角色列表
export const getRoleApi = () => axios({
  url: '/api/rolelist',
  method: 'get'
})

// 新增
export const addRoleApi = (data) => axios({
  url: '/api/roleadd',
  method: 'post',
  data
})

// 编辑
export const editRoleApi = data => axios({
  url: '/api/roleedit',
  method: 'post',
  data
})

// 删除
export const delRoleApi = id => axios({
  url: '/api/roledelete',
  method: 'post',
  data: { id }
})
